<template>
	<view>
		<comHeader :config="navConfig"/>
		<view class="ydBox">
			<view class="topyd">
				<view>11月21日 今天12:00， 2人</view>
				<view>隔断散台</view>
				<view>修改</view>
			</view>
			<view class="infoYd">
				<view>
					<text>张</text>
						<radio-group @change="radioChange">
						 <label
						  class="checkboxYd"
						 v-for="(item, index) in items" 
						 :key="item.value">
								<radio 
								:value="item.value" 
								:checked="index === current" 
								style="transform:scale(0.7);"/>
							{{item.name}}
						</label>
					</radio-group>
				</view>
				<view>
					<text>+86</text>
					<text>15566787887</text>
				</view>
				<view>
					<text>留言备注，我们将尽力安排</text>
					<text>0/25</text>
				</view>
			</view>
			<!-- 套餐推荐 -->
			<view class="tctjBox" v-if="isShowTj">
				<view class="tjTitle">
					<image src="/static/tjLine.png"></image>
					<text>套餐推荐</text>
					<image src="/static/tjLine.png"></image>
				</view>
				
				<view></view>
				<view class="tctj">
					<view
					v-for="(tctj,index) in tctjList"
					:key="index"
					class="tctjList">
						<checkbox-group>
							<checkbox value="cb" style="transform:scale(0.7);"/>
						</checkbox-group>
						<view class="tctjCon">
							<view class="conFl">
								<image :src="tctj.tjImg"></image>
								<view class="text">
									<view class="title">{{tctj.title}}</view>
									<view class="sales">半年销量{{tctj.sales}}</view>
									<view class="prices">￥{{tctj.price}}<text>￥{{tctj.oldPrice}}</text></view>
								</view>
							</view>
							<view class="conFr">
								<uni-number-box 
								:min="1"
								@change="numbChange"/>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
		
		<view class="botmBox">
			<view class="botmBtn" @tap="goYuDing3" v-if="isShowTj">
				<view>￥139  立即支付</view>
			</view>
			<view class="botmBtn" @tap="goYuDing3" v-else>
				<view>立即订座</view>
			</view>
			
		</view>
	</view>
</template>

<script>
	import uniNumberBox from '@/components/uni-number-box/uni-number-box.vue'
	export default{
		components:{
			uniNumberBox
		},
		data(){
			return{
				navConfig:{
					isFixed:false,
					comScroll:0,
					left:{
						text:'',
						isShowLeft:true,
						leftGobackColor:'#333333',
						leftTextColor:'',
					},
					mid:{
						isShowMid:true,
						text:'新韩小馆烤肉'
					},
					right:{
						text:'',
						isShowRight:false,
					}
				},
				isShowTj:true,//是否显示套餐推荐
				items:[
					{
						value: 'women',
						name: '女士'
					},
					{
						 value: 'men',
						name: '先生'
					}
				],
				current: 0,
				numberValue: 1,
				tctjList:[
					{
						tjImg:'/static/testglPic2.png',
						title:'招牌二人餐',
						sales:'2133',
						price:199,
						oldPrice:256
					},
					{
						tjImg:'/static/testglPic2.png',
						title:'招牌四人餐',
						sales:'2133',
						price:389,
						oldPrice:499
					}
				]
			}
		},
		methods:{
			radioChange(evt) {
				for (let i = 0; i < this.items.length; i++) {
					if (this.items[i].value === evt.target.value) {
						this.current = i;
						break;
					}
				}
			},
			numbChange(value) {
				this.numberValue = value
			},
			goYuDing3(){
				uni.navigateTo({
					url:'/pages/home/food/yuding3'
				})
			}
		},
		// computed:{
		// 	btnMoney(){
				
		// 	}
		// }
	}
</script>

<style>
	.ydBox{
		margin: 0 24upx;
		padding-top: 152upx;
		
	}
	.topyd{
		display: flex;
		flex-direction: row;
		align-items: center;
		font-size: 30upx;
		padding:0 50upx;
		height: 100upx;
		background: rgba(255,255,255,1);
		box-shadow: 0px 0px 18px 0px rgba(57,57,57,0.11);
		margin-bottom: 18upx;
		box-sizing: border-box;
	}
	.topyd > view:nth-child(2){
		margin-left: 40upx;
	}
	.topyd > view:last-child{
		color: #4783D3;
		font-size: 28upx;
		margin-left: 20upx;
	}
	.infoYd{
		display: flex;
		flex-direction: column;
		align-items: center;
		background: rgba(255,255,255,1);
		box-shadow: 0px 0px 18px 0px rgba(57,57,57,0.11);
		padding: 0 50upx;
		box-sizing: border-box;
	}
	.infoYd > view{
		width:100%;
		height: 102upx;
		line-height: 102upx;
		border-bottom: 1px solid #D2D2D2;
		display: flex;
		flex-direction:row ;
		justify-content: space-between;
		align-items: center;
		color: #333333;
		font-size: 30upx;
	}
	.infoYd > view:nth-child(2){
		justify-content: flex-start;
	}
	.infoYd > view:nth-child(2) text:first-child{
		margin-right: 84upx;
	}
	.infoYd > view:last-child{
		color: #999999;
		border-bottom: 0;
	}
	.checkboxYd{
		margin-left: 30upx;
	}
	/* 推荐你喜欢的 */
	.botmPad{
		padding-bottom: 150upx;
	}
	.tjTitle {
		margin: 48upx auto 46upx auto;
		text-align: center;
		display: flex;
		flex-direction: row;
		justify-content: center;
		align-items: center;
	}
	.tjTitle{
		color: 	#010101;
		font-size: 30upx;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: center;
	}
	.tjTitle image:nth-of-type(1){
		width:81upx;
		height: 15upx;
		margin-right:20upx;
	}
	.tjTitle image:nth-of-type(2){
		width:81upx;
		height: 15upx;
		transform: rotateY(180);
		margin-left:45upx;
	}
	
	.tctj{
		display: flex;
		flex-direction: column;
		align-items: center;
		padding-bottom: 120upx;
	}
	.tctjList{
		padding:27upx 10upx;
		width:100%;
		display: flex;
		flex-direction: row;
		align-items: center;
		border-bottom: 1px solid #F0F0F0;
		box-sizing: border-box;
	}
	.tctjList:last-child{
		border-bottom: 0;
	}
	.tctjCon{
		width:100%;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
	.conFl{
		display: flex;
		flex-direction: row;
		align-items: center;
	}
	.conFl image{
		width:183upx;
		height: 135upx;
		border-radius: 10upx;
		margin-right: 20upx;
	}
	.text{
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
		max-width: 245upx;
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
	}
	.title{
		font-size: 28upx;
		color: #000000;
	}
	.sales{
		font-size: 20upx;
		color: #999999;
	}
	.prices{
		color: #DD540A;
		font-size: 26upx;
	}
	.prices text{
		color: #999999;
		font-size: 18upx;
	}
	.conFr /deep/ .uni-numbox,.conFr /deep/ input{
		height: 36upx;
	}
	.conFr /deep/ .uni-numbox__minus,.conFr /deep/ .uni-numbox__plus{
		width: 30upx;
		height: 30upx;
		border:1px solid #4783D3;
		border-radius: 30upx;
		padding:3upx;
		color:#4783D3;
	}
	
	/* 底部按钮 */
	.botmBox{
		background: #FFFFFF;
		padding: 20upx 0;
		width: 100%;
		position: fixed;
		bottom:0upx;
		left: 0;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: center;
	}
	.botmBtn{
		width:714upx;
		height:80upx;
		line-height:80upx;
		border-radius: 80upx;
		box-shadow: 0px 0px 27px 0px rgba(5,36,72,0.15);
		background: linear-gradient(to bottom,#4C89D8,#2A60BA);
		color: #FFFFFF;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: center;
		padding:10upx 0upx;
		box-sizing: border-box;
		text-align: center;
	}
	.botmBtn > view{
		font-size: 28upx;
	}
	
</style>
